<!doctype html>



  


<html class="theme-next muse use-motion" lang="zh-Hans">
<head>
  <meta charset="UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1"/>









<meta http-equiv="Cache-Control" content="no-transform" />
<meta http-equiv="Cache-Control" content="no-siteapp" />















  
  
  <link href="/lib/fancybox/source/jquery.fancybox.css?v=2.1.5" rel="stylesheet" type="text/css" />




  
  
  
  

  
    
    
  

  

  

  

  

  
    
    
    <link href="//fonts.googleapis.com/css?family=Lato:300,300italic,400,400italic,700,700italic&subset=latin,latin-ext" rel="stylesheet" type="text/css">
  






<link href="/lib/font-awesome/css/font-awesome.min.css?v=4.6.2" rel="stylesheet" type="text/css" />

<link href="/css/main.css?v=5.1.1" rel="stylesheet" type="text/css" />


  <meta name="keywords" content="Zabbix," />








  <link rel="shortcut icon" type="image/x-icon" href="/favicon.ico?v=5.1.1" />






<meta name="description" content="&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;由于有需要监控网络流量， 于是，部署了zabbix监控路由器流量的应用，下面是通过查找资料，自行实验并成功监控路由器接口流量的过程。 &amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;首先，在路由器上面配置好SNMP协议，我这边配置的是SNMP V3版本协议">
<meta name="keywords" content="Zabbix">
<meta property="og:type" content="article">
<meta property="og:title" content="zabbix使用SNMP V3监控路由器接口流量">
<meta property="og:url" content="https://hcldirgit.github.io/2017/09/03/Zabbix/21. zabbix使用SNMP V3监控路由器接口流量/index.html">
<meta property="og:site_name" content="失落的乐章">
<meta property="og:description" content="&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;由于有需要监控网络流量， 于是，部署了zabbix监控路由器流量的应用，下面是通过查找资料，自行实验并成功监控路由器接口流量的过程。 &amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;首先，在路由器上面配置好SNMP协议，我这边配置的是SNMP V3版本协议">
<meta property="og:locale" content="zh-Hans">
<meta property="og:image" content="https://github.com/hcldirgit/image/blob/master/zabbix%E4%BD%BF%E7%94%A8SNMP%20V3%E7%9B%91%E6%8E%A7%E8%B7%AF%E7%94%B1%E5%99%A8%E6%8E%A5%E5%8F%A3%E6%B5%81%E9%87%8F/01.jpeg?raw=true">
<meta property="og:image" content="https://github.com/hcldirgit/image/blob/master/zabbix%E4%BD%BF%E7%94%A8SNMP%20V3%E7%9B%91%E6%8E%A7%E8%B7%AF%E7%94%B1%E5%99%A8%E6%8E%A5%E5%8F%A3%E6%B5%81%E9%87%8F/02.jpeg?raw=true">
<meta property="og:image" content="https://github.com/hcldirgit/image/blob/master/zabbix%E4%BD%BF%E7%94%A8SNMP%20V3%E7%9B%91%E6%8E%A7%E8%B7%AF%E7%94%B1%E5%99%A8%E6%8E%A5%E5%8F%A3%E6%B5%81%E9%87%8F/03.jpeg?raw=true">
<meta property="og:image" content="https://github.com/hcldirgit/image/blob/master/zabbix%E4%BD%BF%E7%94%A8SNMP%20V3%E7%9B%91%E6%8E%A7%E8%B7%AF%E7%94%B1%E5%99%A8%E6%8E%A5%E5%8F%A3%E6%B5%81%E9%87%8F/04.jpeg?raw=true">
<meta property="og:image" content="https://github.com/hcldirgit/image/blob/master/zabbix%E4%BD%BF%E7%94%A8SNMP%20V3%E7%9B%91%E6%8E%A7%E8%B7%AF%E7%94%B1%E5%99%A8%E6%8E%A5%E5%8F%A3%E6%B5%81%E9%87%8F/05.jpeg?raw=true">
<meta property="og:updated_time" content="2017-09-02T17:39:28.944Z">
<meta name="twitter:card" content="summary">
<meta name="twitter:title" content="zabbix使用SNMP V3监控路由器接口流量">
<meta name="twitter:description" content="&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;由于有需要监控网络流量， 于是，部署了zabbix监控路由器流量的应用，下面是通过查找资料，自行实验并成功监控路由器接口流量的过程。 &amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;首先，在路由器上面配置好SNMP协议，我这边配置的是SNMP V3版本协议">
<meta name="twitter:image" content="https://github.com/hcldirgit/image/blob/master/zabbix%E4%BD%BF%E7%94%A8SNMP%20V3%E7%9B%91%E6%8E%A7%E8%B7%AF%E7%94%B1%E5%99%A8%E6%8E%A5%E5%8F%A3%E6%B5%81%E9%87%8F/01.jpeg?raw=true">



<script type="text/javascript" id="hexo.configurations">
  var NexT = window.NexT || {};
  var CONFIG = {
    root: '/',
    scheme: 'Muse',
    sidebar: {"position":"left","display":"post","offset":12,"offset_float":0,"b2t":false,"scrollpercent":false},
    fancybox: true,
    motion: true,
    duoshuo: {
      userId: '0',
      author: '博主'
    },
    algolia: {
      applicationID: '',
      apiKey: '',
      indexName: '',
      hits: {"per_page":10},
      labels: {"input_placeholder":"Search for Posts","hits_empty":"We didn't find any results for the search: ${query}","hits_stats":"${hits} results found in ${time} ms"}
    }
  };
</script>



  <link rel="canonical" href="https://hcldirgit.github.io/2017/09/03/Zabbix/21. zabbix使用SNMP V3监控路由器接口流量/"/>





  <title>zabbix使用SNMP V3监控路由器接口流量 | 失落的乐章</title>
</head>

<body itemscope itemtype="http://schema.org/WebPage" lang="zh-Hans">

  




<script>
  (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
            (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
          m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
  })(window,document,'script','https://www.google-analytics.com/analytics.js','ga');
  ga('create', '85*****1', 'auto');
  ga('send', 'pageview');
</script>


  <script type="text/javascript">
    var _hmt = _hmt || [];
    (function() {
      var hm = document.createElement("script");
      hm.src = "https://hm.baidu.com/hm.js?87980c**************99ec5e26fb5";
      var s = document.getElementsByTagName("script")[0];
      s.parentNode.insertBefore(hm, s);
    })();
  </script>











  
  
    
  

  <div class="container sidebar-position-left page-post-detail ">
    <div class="headband"></div>

    <header id="header" class="header" itemscope itemtype="http://schema.org/WPHeader">
      <div class="header-inner"><div class="site-brand-wrapper">
  <div class="site-meta ">
    

    <div class="custom-logo-site-title">
      <a href="/"  class="brand" rel="start">
        <span class="logo-line-before"><i></i></span>
        <span class="site-title">失落的乐章</span>
        <span class="logo-line-after"><i></i></span>
      </a>
    </div>
      
        <p class="site-subtitle">技术面前，永远都是学生。</p>
      
  </div>

  <div class="site-nav-toggle">
    <button>
      <span class="btn-bar"></span>
      <span class="btn-bar"></span>
      <span class="btn-bar"></span>
    </button>
  </div>
</div>

<nav class="site-nav">
  

  
    <ul id="menu" class="menu">
      
        
        <li class="menu-item menu-item-home">
          <a href="/" rel="section">
            
              <i class="menu-item-icon fa fa-fw fa-home"></i> <br />
            
            首页
          </a>
        </li>
      
        
        <li class="menu-item menu-item-categories">
          <a href="/categories" rel="section">
            
              <i class="menu-item-icon fa fa-fw fa-th"></i> <br />
            
            分类
          </a>
        </li>
      
        
        <li class="menu-item menu-item-tags">
          <a href="/tags" rel="section">
            
              <i class="menu-item-icon fa fa-fw fa-tags"></i> <br />
            
            标签
          </a>
        </li>
      
        
        <li class="menu-item menu-item-message">
          <a href="/message" rel="section">
            
              <i class="menu-item-icon fa fa-fw fa-external-link"></i> <br />
            
            留言
          </a>
        </li>
      

      
    </ul>
  

  
</nav>



 </div>
    </header>

    <main id="main" class="main">
      <div class="main-inner">
        <div class="content-wrap">
          <div id="content" class="content">
            

  <div id="posts" class="posts-expand">
    

  

  
  
  

  <article class="post post-type-normal " itemscope itemtype="http://schema.org/Article">
    <link itemprop="mainEntityOfPage" href="https://hcldirgit.github.io/2017/09/03/Zabbix/21. zabbix使用SNMP V3监控路由器接口流量/">

    <span hidden itemprop="author" itemscope itemtype="http://schema.org/Person">
      <meta itemprop="name" content="失落的乐章">
      <meta itemprop="description" content="">
      <meta itemprop="image" content="/images/0.png">
    </span>

    <span hidden itemprop="publisher" itemscope itemtype="http://schema.org/Organization">
      <meta itemprop="name" content="失落的乐章">
    </span>

    
      <header class="post-header">

        
        
          <h1 class="post-title" itemprop="name headline">zabbix使用SNMP V3监控路由器接口流量</h1>
        

        <div class="post-meta">
          <span class="post-time">
            
              <span class="post-meta-item-icon">
                <i class="fa fa-calendar-o"></i>
              </span>
              
                <span class="post-meta-item-text">发表于</span>
              
              <time title="创建于" itemprop="dateCreated datePublished" datetime="2017-09-03T02:13:44+08:00">
                2017-09-03
              </time>
            

            

            
          </span>

          

          
            
          

          
          

          

          

          

        </div>
      </header>
    

    <div class="post-body" itemprop="articleBody">

      
      

      
        <p>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;由于有需要监控网络流量， 于是，部署了zabbix监控路由器流量的应用，下面是通过查找资料，自行实验并成功监控路由器接口流量的过程。</p>
<p>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;首先，在路由器上面配置好SNMP协议，我这边配置的是SNMP V3版本协议，并且使用了加密认证的方式(用户名：test认证算法使用SHA-1，密码：abcdefg加密密码使用AES协议，密码：hijklmnopq)。</p>
<p>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;配置完之后需要进行检测看能否通过SNMP协议从路由器上面获取数据。</p>
<p>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;通过在zabbi服务器上面使用snmpwalk，snmpget等工具来尝试获取路由器信息，要使用这两个工具需要先安装net-snmp net-snmp-utils这两个包，才能使用snmpwalk,snmpget等工具测试snmp访问。</p>
<p>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;安装完成之后开始调用snmpwalk命令来获取snmp协议的数据。</p>
<p>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;SNMP V3认证使用方法</p>
<figure class="highlight bash"><table><tr><td class="gutter"><pre><div class="line">1</div></pre></td><td class="code"><pre><div class="line">snmpwalk -v 3 -u <span class="built_in">test</span> -a sha -A abcdefg -x AES -X hijklmnopq -l authPriv 192.168.1.1 interfaces.ifTable.ifEntry.ifOutOctets（或者使用OID号）</div></pre></td></tr></table></figure>
<p>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;其中-v选择版本号</p>
<ul>
<li>-u用户名</li>
<li>-a认证算法为SHA-1</li>
<li>-A认证密码为abcdefg</li>
<li>-x加密协议为AES</li>
<li>-X加密密码为hijklmnopq</li>
<li>-l authPriv启用认证和加密功能</li>
<li>interfaces.ifTable.ifEntry.ifOutOctets（查看接口出去的流量）</li>
</ul>
<p>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;关于一些常用的公共的OID号可以百度一下，下面也列出了一些常用的OID号：</p>
<p>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;常用SNMPOID号</p>
<figure class="highlight bash"><table><tr><td class="gutter"><pre><div class="line">1</div><div class="line">2</div><div class="line">3</div><div class="line">4</div><div class="line">5</div><div class="line">6</div><div class="line">7</div><div class="line">8</div><div class="line">9</div><div class="line">10</div><div class="line">11</div><div class="line">12</div><div class="line">13</div><div class="line">14</div><div class="line">15</div><div class="line">16</div><div class="line">17</div><div class="line">18</div><div class="line">19</div><div class="line">20</div><div class="line">21</div><div class="line">22</div><div class="line">23</div><div class="line">24</div><div class="line">25</div><div class="line">26</div><div class="line">27</div><div class="line">28</div><div class="line">29</div><div class="line">30</div><div class="line">31</div><div class="line">32</div><div class="line">33</div><div class="line">34</div><div class="line">35</div><div class="line">36</div><div class="line">37</div><div class="line">38</div><div class="line">39</div><div class="line">40</div><div class="line">41</div><div class="line">42</div><div class="line">43</div><div class="line">44</div><div class="line">45</div><div class="line">46</div><div class="line">47</div><div class="line">48</div><div class="line">49</div><div class="line">50</div><div class="line">51</div><div class="line">52</div><div class="line">53</div><div class="line">54</div><div class="line">55</div><div class="line">56</div><div class="line">57</div><div class="line">58</div><div class="line">59</div><div class="line">60</div><div class="line">61</div><div class="line">62</div><div class="line">63</div><div class="line">64</div><div class="line">65</div><div class="line">66</div><div class="line">67</div><div class="line">68</div><div class="line">69</div><div class="line">70</div><div class="line">71</div><div class="line">72</div><div class="line">73</div><div class="line">74</div><div class="line">75</div><div class="line">76</div><div class="line">77</div><div class="line">78</div><div class="line">79</div><div class="line">80</div><div class="line">81</div><div class="line">82</div><div class="line">83</div><div class="line">84</div><div class="line">85</div><div class="line">86</div><div class="line">87</div><div class="line">88</div><div class="line">89</div><div class="line">90</div><div class="line">91</div><div class="line">92</div><div class="line">93</div><div class="line">94</div><div class="line">95</div><div class="line">96</div><div class="line">97</div><div class="line">98</div><div class="line">99</div><div class="line">100</div><div class="line">101</div><div class="line">102</div><div class="line">103</div><div class="line">104</div><div class="line">105</div><div class="line">106</div><div class="line">107</div><div class="line">108</div><div class="line">109</div><div class="line">110</div><div class="line">111</div><div class="line">112</div><div class="line">113</div><div class="line">114</div><div class="line">115</div><div class="line">116</div><div class="line">117</div><div class="line">118</div><div class="line">119</div><div class="line">120</div><div class="line">121</div><div class="line">122</div><div class="line">123</div><div class="line">124</div><div class="line">125</div><div class="line">126</div><div class="line">127</div><div class="line">128</div><div class="line">129</div><div class="line">130</div><div class="line">131</div><div class="line">132</div><div class="line">133</div><div class="line">134</div><div class="line">135</div><div class="line">136</div><div class="line">137</div><div class="line">138</div><div class="line">139</div><div class="line">140</div><div class="line">141</div><div class="line">142</div><div class="line">143</div><div class="line">144</div><div class="line">145</div><div class="line">146</div><div class="line">147</div><div class="line">148</div><div class="line">149</div><div class="line">150</div><div class="line">151</div><div class="line">152</div><div class="line">153</div><div class="line">154</div><div class="line">155</div><div class="line">156</div><div class="line">157</div></pre></td><td class="code"><pre><div class="line">Variable Descriptor Object Identifier </div><div class="line">System Group </div><div class="line">sysDescr 1.3.6.1.2.1.1.1 </div><div class="line">sysObjectID 1.3.6.1.2.1.1.2 </div><div class="line">sysUpTime 1.3.6.1.2.1.1.3 </div><div class="line">sysContact 1.3.6.1.2.1.1.4 </div><div class="line">sysName 1.3.6.1.2.1.1.5 </div><div class="line">sysLocation 1.3.6.1.2.1.1.6 </div><div class="line">sysServices 1.3.6.1.2.1.1.7 </div><div class="line"></div><div class="line">interfaces Group </div><div class="line">ifNumber 1.3.6.1.2.1.2.1 </div><div class="line">ifTable 1.3.6.1.2.1.2.2 </div><div class="line">ifEntry 1.3.6.1.2.1.2.2.1 </div><div class="line">ifIndex 1.3.6.1.2.1.2.2.1.1 </div><div class="line">ifDescr 1.3.6.1.2.1.2.2.1.2 </div><div class="line">ifType 1.3.6.1.2.1.2.2.1.3 </div><div class="line">ifMtu 1.3.6.1.2.1.2.2.1.4 </div><div class="line">ifSpeed 1.3.6.1.2.1.2.2.1.5 </div><div class="line">ifPhysAddress 1.3.6.1.2.1.2.2.1.6 </div><div class="line">ifAdminStatus 1.3.6.1.2.1.2.2.1.7 </div><div class="line">ifOperStatus 1.3.6.1.2.1.2.2.1.8 </div><div class="line">ifLastChange 1.3.6.1.2.1.2.2.1.9 </div><div class="line">ifInOctets 1.3.6.1.2.1.2.2.1.10 </div><div class="line">ifInUcastPkts 1.3.6.1.2.1.2.2.1.11 </div><div class="line">ifInNUcastPkts 1.3.6.1.2.1.2.2.1.12 </div><div class="line">ifInDiscards 1.3.6.1.2.1.2.2.1.13 </div><div class="line">ifInErrors 1.3.6.1.2.1.2.2.1.14 </div><div class="line">ifInUnknownProtos 1.3.6.1.2.1.2.2.1.15 </div><div class="line">ifOutOctets 1.3.6.1.2.1.2.2.1.16 </div><div class="line">ifOutUcastPkts 1.3.6.1.2.1.2.2.1.17 </div><div class="line">ifOutNUcastPkts 1.3.6.1.2.1.2.2.1.18 </div><div class="line">ifOutDiscards 1.3.6.1.2.1.2.2.1.19 </div><div class="line">ifOutErrors 1.3.6.1.2.1.2.2.1.20 </div><div class="line">ifOutQLen 1.3.6.1.2.1.2.2.1.21 </div><div class="line">ifSpecific 1.3.6.1.2.1.2.2.1.22 </div><div class="line"></div><div class="line">IP Group </div><div class="line">ipForwarding 1.3.6.1.2.1.4.1 </div><div class="line">ipDefaultTTL 1.3.6.1.2.1.4.2 </div><div class="line">ipInReceives 1.3.6.1.2.1.4.3 </div><div class="line">ipInHdrErrors 1.3.6.1.2.1.4.4 </div><div class="line">ipInAddrErrors 1.3.6.1.2.1.4.5 </div><div class="line">ipForwDatagrams 1.3.6.1.2.1.4.6 </div><div class="line">ipInUnknownProtos 1.3.6.1.2.1.4.7 </div><div class="line">ipInDiscards 1.3.6.1.2.1.4.8 </div><div class="line">ipInDelivers 1.3.6.1.2.1.4.9 </div><div class="line">ipOutRequests 1.3.6.1.2.1.4.10 </div><div class="line">ipOutDiscards 1.3.6.1.2.1.4.11 </div><div class="line">ipOutNoRoutes 1.3.6.1.2.1.4.12 </div><div class="line">ipReasmTimeout 1.3.6.1.2.1.4.13 </div><div class="line">ipReasmReqds 1.3.6.1.2.1.4.14 </div><div class="line">ipReasmOKs 1.3.6.1.2.1.4.15 </div><div class="line">ipReasmFails 1.3.6.1.2.1.4.16 </div><div class="line">ipFragsOKs 1.3.6.1.2.1.4.17 </div><div class="line">ipFragsFails 1.3.6.1.2.1.4.18 </div><div class="line">ipFragCreates 1.3.6.1.2.1.4.19 </div><div class="line">ipAddrTable 1.3.6.1.2.1.4.20 </div><div class="line">ipAddrEntry 1.3.6.1.2.1.4.20.1 </div><div class="line">ipAdEntAddr 1.3.6.1.2.1.4.20.1.1 </div><div class="line">ipAdEntIfIndex 1.3.6.1.2.1.4.20.1.2 </div><div class="line">ipAdEntNetMask 1.3.6.1.2.1.4.20.1.3 </div><div class="line">ipAdEntBcastAddr 1.3.6.1.2.1.4.20.1.4 </div><div class="line">ipAdEntReasmMaxSize 1.3.6.1.2.1.4.20.1.5 </div><div class="line"></div><div class="line">ICMP Group </div><div class="line">icmpInMsgs 1.3.6.1.2.1.5.1 </div><div class="line">icmpInErrors 1.3.6.1.2.1.5.2 </div><div class="line">icmpInDestUnreachs 1.3.6.1.2.1.5.3 </div><div class="line">icmpInTimeExcds 1.3.6.1.2.1.5.4 </div><div class="line">icmpInParmProbs 1.3.6.1.2.1.5.5 </div><div class="line">icmpInSrcQuenchs 1.3.6.1.2.1.5.6 </div><div class="line">icmpInRedirects 1.3.6.1.2.1.5.7 </div><div class="line">icmpInEchos 1.3.6.1.2.1.5.8 </div><div class="line">icmpInEchoReps 1.3.6.1.2.1.5.9 </div><div class="line">icmpInTimestamps 1.3.6.1.2.1.5.10 </div><div class="line">icmpInTimestampReps 1.3.6.1.2.1.5.11 </div><div class="line">icmpInAddrMasks 1.3.6.1.2.1.5.12 </div><div class="line">icmpInAddrMaskReps 1.3.6.1.2.1.5.13 </div><div class="line">icmpOutMsgs 1.3.6.1.2.1.5.14 </div><div class="line">icmpOutErrors 1.3.6.1.2.1.5.15 </div><div class="line">icmpOutDestUnreachs 1.3.6.1.2.1.5.16 </div><div class="line">icmpOutTimeExcds 1.3.6.1.2.1.5.17 </div><div class="line">icmpOutParmProbs 1.3.6.1.2.1.5.18 </div><div class="line">icmpOutSrcQuenchs 1.3.6.1.2.1.5.19 </div><div class="line">icmpOutRedirects 1.3.6.1.2.1.5.20 </div><div class="line">icmpOutEchos 1.3.6.1.2.1.5.21 </div><div class="line">icmpOutEchoReps 1.3.6.1.2.1.5.22 </div><div class="line">icmpOutTimestamps 1.3.6.1.2.1.5.23 </div><div class="line">icmpOutTimestampReps 1.3.6.1.2.1.5.24 </div><div class="line">icmpOutAddrMasks 1.3.6.1.2.1.5.25 </div><div class="line">icmpOutAddrMaskReps 1.3.6.1.2.1.5.26 </div><div class="line"></div><div class="line">TCP Group </div><div class="line">tcpRtoAlgorithm 1.3.6.1.2.1.6.1 </div><div class="line">tcpRtoMin 1.3.6.1.2.1.6.2 </div><div class="line">tcpRtoMax 1.3.6.1.2.1.6.3 </div><div class="line">tcpMaxConn 1.3.6.1.2.1.6.4 </div><div class="line">tcpActiveOpens 1.3.6.1.2.1.6.5 </div><div class="line">tcpPassiveOpens 1.3.6.1.2.1.6.6 </div><div class="line">tcpAttemptFails 1.3.6.1.2.1.6.7 </div><div class="line">tcpEstabResets 1.3.6.1.2.1.6.8 </div><div class="line">tcpCurrEstab 1.3.6.1.2.1.6.9 </div><div class="line">tcpInSegs 1.3.6.1.2.1.6.10 </div><div class="line">tcpOutSegs 1.3.6.1.2.1.6.11 </div><div class="line">tcpRetransSegs 1.3.6.1.2.1.6.12 </div><div class="line">tcpConnTable 1.3.6.1.2.1.6.13 </div><div class="line">tcpConnEntry 1.3.6.1.2.1.6.13.1 </div><div class="line">tcpConnState 1.3.6.1.2.1.6.13.1.1 </div><div class="line">tcpConnLocalAddress 1.3.6.1.2.1.6.13.1.2 </div><div class="line">tcpConnLocalPort 1.3.6.1.2.1.6.13.1.3 </div><div class="line">tcpConnRemAddress 1.3.6.1.2.1.6.13.1.4 </div><div class="line">tcpConnRemPort 1.3.6.1.2.1.6.13.1.5 </div><div class="line">tcpInErrs 1.3.6.1.2.1.6.14 </div><div class="line">tcpOutRsts 1.3.6.1.2.1.6.15 </div><div class="line"></div><div class="line">UDP Group </div><div class="line">udpInDatagrams 1.3.6.1.2.1.7.1 </div><div class="line">udpNoPorts 1.3.6.1.2.1.7.2 </div><div class="line">udpInErrors 1.3.6.1.2.1.7.3 </div><div class="line">udpOutDatagrams 1.3.6.1.2.1.7.4 </div><div class="line">udpTable 1.3.6.1.2.1.7.5 </div><div class="line">udpEntry 1.3.6.1.2.1.7.5.1 </div><div class="line">udpLocalAddress 1.3.6.1.2.1.7.5.1.1 </div><div class="line">udpLocalPort 1.3.6.1.2.1.7.5.1.2 </div><div class="line"></div><div class="line">SNMP Group </div><div class="line">snmpInPkts 1.3.6.1.2.1.11.1 </div><div class="line">snmpOutPkts 1.3.6.1.2.1.11.2 </div><div class="line">snmpInBadVersions 1.3.6.1.2.1.11.3 </div><div class="line">snmpInBadCommunityNames 1.3.6.1.2.1.11.4 </div><div class="line">snmpInBadCommunityUses 1.3.6.1.2.1.11.5 </div><div class="line">snmpInASNParseErrs 1.3.6.1.2.1.11.6 </div><div class="line">NOT USED 1.3.6.1.2.1.11.7 </div><div class="line">snmpInTooBigs 1.3.6.1.2.1.11.8 </div><div class="line">snmpInNoSuchNames 1.3.6.1.2.1.11.9 </div><div class="line">snmpInBadValues 1.3.6.1.2.1.11.10 </div><div class="line">snmpInReadOnlys 1.3.6.1.2.1.11.11 </div><div class="line">snmpInGenErrs 1.3.6.1.2.1.11.12 </div><div class="line">snmpInTotalReqVars 1.3.6.1.2.1.11.13 </div><div class="line">snmpInTotalSetVars 1.3.6.1.2.1.11.14 </div><div class="line">snmpInGetRequests 1.3.6.1.2.1.11.15 </div><div class="line">snmpInGetNexts 1.3.6.1.2.1.11.16 </div><div class="line">snmpInSetRequests 1.3.6.1.2.1.11.17 </div><div class="line">snmpInGetResponses 1.3.6.1.2.1.11.18 </div><div class="line">snmpInTraps 1.3.6.1.2.1.11.19 </div><div class="line">snmpOutTooBigs 1.3.6.1.2.1.11.20 </div><div class="line">snmpOutNoSuchNames 1.3.6.1.2.1.11.21 </div><div class="line">snmpOutBadValues 1.3.6.1.2.1.11.22 </div><div class="line">NOT USED 1.3.6.1.2.1.11.23 </div><div class="line">snmpOutGenErrs 1.3.6.1.2.1.11.24 </div><div class="line">snmpOutGetRequests 1.3.6.1.2.1.11.25 </div><div class="line">snmpOutGetNexts 1.3.6.1.2.1.11.26 </div><div class="line">snmpOutSetRequests 1.3.6.1.2.1.11.27 </div><div class="line">snmpOutGetResponses 1.3.6.1.2.1.11.28 </div><div class="line">snmpOutTraps 1.3.6.1.2.1.11.29 </div><div class="line">snmpEnableAuthenTraps 1.3.6.1.2.1.11.30</div></pre></td></tr></table></figure>
<p>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;SNMP抓包有结果后就可以在zabbix的配置页面上面开始配置添加路由器了。</p>
<p>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;首先，添加一台主机，主机使用snmp协议</p>
<p><img src="https://github.com/hcldirgit/image/blob/master/zabbix%E4%BD%BF%E7%94%A8SNMP%20V3%E7%9B%91%E6%8E%A7%E8%B7%AF%E7%94%B1%E5%99%A8%E6%8E%A5%E5%8F%A3%E6%B5%81%E9%87%8F/01.jpeg?raw=true" alt=""></p>
<p>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;然后创建一个应用集，名字叫做interfacetraffic</p>
<p><img src="https://github.com/hcldirgit/image/blob/master/zabbix%E4%BD%BF%E7%94%A8SNMP%20V3%E7%9B%91%E6%8E%A7%E8%B7%AF%E7%94%B1%E5%99%A8%E6%8E%A5%E5%8F%A3%E6%B5%81%E9%87%8F/02.jpeg?raw=true" alt=""></p>
<p>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;然后在该应用集下面创建项目，其中键值和SNMP OID要一致，类型选择SNMPV3 代理程式，安全名称就是用户名，安全级别使用authpriv就是基于认证和加密的SNMPV3，我这里使用的是SHA认证，所以选中SHA，填写SHA密码，我这选的是AES加密密码，所以也要选中AES加密，并在下面输入密码，另外注意单位，我这使用的是bps，因为SNMP取到的是字节为单位，这里改成bps的单位时候需要将源数据乘8，这里选中的是使用自定倍数，值填写为8，最后还得注意储存量得改为差量（每秒速率），因为SNMP获取到的接口流量是累加的，所以获取到的值也是累加的，这里调成差量（每秒速率）将使用后一次取到的值减去前一次取到的值，然后除以中间相差的秒数，这才是真正的改时间段平均带宽。</p>
<p><img src="https://github.com/hcldirgit/image/blob/master/zabbix%E4%BD%BF%E7%94%A8SNMP%20V3%E7%9B%91%E6%8E%A7%E8%B7%AF%E7%94%B1%E5%99%A8%E6%8E%A5%E5%8F%A3%E6%B5%81%E9%87%8F/03.jpeg?raw=true" alt=""></p>
<p>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;上面只是创建好了一个接口的入口流量，按照这个模板修改，可以添加多个接口的出入口流量监控项。</p>
<p>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;创建完监控项之后就可以生成图表了。</p>
<p>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;下面是生成图表的过程：</p>
<p><img src="https://github.com/hcldirgit/image/blob/master/zabbix%E4%BD%BF%E7%94%A8SNMP%20V3%E7%9B%91%E6%8E%A7%E8%B7%AF%E7%94%B1%E5%99%A8%E6%8E%A5%E5%8F%A3%E6%B5%81%E9%87%8F/04.jpeg?raw=true" alt=""></p>
<p>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;这样，就可以监控该路由器的G0/0的出入流量了，截图如下：</p>
<p><img src="https://github.com/hcldirgit/image/blob/master/zabbix%E4%BD%BF%E7%94%A8SNMP%20V3%E7%9B%91%E6%8E%A7%E8%B7%AF%E7%94%B1%E5%99%A8%E6%8E%A5%E5%8F%A3%E6%B5%81%E9%87%8F/05.jpeg?raw=true" alt=""></p>
<p>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;至此，该教程文档完结，在配置过程中若碰到了一些其他问题可以百度或者谷歌查找资料解决</p>

      
    </div>

    <div>
      
        

      
    </div>

    <div>
      
        

      
    </div>

    <div>
      
        

      
    </div>

    <footer class="post-footer">
      
        <div class="post-tags">
          
            <a href="/tags/Zabbix/" rel="tag"># Zabbix</a>
          
        </div>
      

      
      
      

      
        <div class="post-nav">
          <div class="post-nav-next post-nav-item">
            
              <a href="/2017/09/03/Zabbix/20. zabbix设置邮件报警/" rel="next" title="zabbix设置邮件报警">
                <i class="fa fa-chevron-left"></i> zabbix设置邮件报警
              </a>
            
          </div>

          <span class="post-nav-divider"></span>

          <div class="post-nav-prev post-nav-item">
            
              <a href="/2017/09/03/Zabbix/22. zabbix使用percona zabbix mysql-plugin监控mysql数据库/" rel="prev" title="zabbix使用percona zabbix mysql-plugin监控mysql数据库">
                zabbix使用percona zabbix mysql-plugin监控mysql数据库 <i class="fa fa-chevron-right"></i>
              </a>
            
          </div>
        </div>
      

      
      
    </footer>
  </article>



    <div class="post-spread">
      
    </div>
  </div>


          </div>
          


          
  <div class="comments" id="comments">
    
  </div>


        </div>
        
          
  
  <div class="sidebar-toggle">
    <div class="sidebar-toggle-line-wrap">
      <span class="sidebar-toggle-line sidebar-toggle-line-first"></span>
      <span class="sidebar-toggle-line sidebar-toggle-line-middle"></span>
      <span class="sidebar-toggle-line sidebar-toggle-line-last"></span>
    </div>
  </div>

  <aside id="sidebar" class="sidebar">
    <div class="sidebar-inner">

      

      

      <section class="site-overview sidebar-panel sidebar-panel-active">
        <div class="site-author motion-element" itemprop="author" itemscope itemtype="http://schema.org/Person">
          <img class="site-author-image" itemprop="image"
               src="/images/0.png"
               alt="失落的乐章" />
          <p class="site-author-name" itemprop="name">失落的乐章</p>
           
              <p class="site-description motion-element" itemprop="description">失落的乐章的Blog</p>
          
        </div>
        <nav class="site-state motion-element">

          
            <div class="site-state-item site-state-posts">
              <a href="/">
                <span class="site-state-item-count">627</span>
                <span class="site-state-item-name">日志</span>
              </a>
            </div>
          

          

          
            
            
            <div class="site-state-item site-state-tags">
              <a href="/tags/index.html">
                <span class="site-state-item-count">38</span>
                <span class="site-state-item-name">标签</span>
              </a>
            </div>
          

        </nav>

        

        <div class="links-of-author motion-element">
          
            
              <span class="links-of-author-item">
                <a href="https://github.com/hcldirgit" target="_blank" title="GitHub">
                  
                    <i class="fa fa-fw fa-github"></i>
                  
                  GitHub
                </a>
              </span>
            
          
        </div>

        
        

        
        

        


      </section>

      

      

    </div>
  </aside>


        
      </div>
    </main>

    <footer id="footer" class="footer">
      <div class="footer-inner">
        <div class="copyright" >
  
  &copy; 
  <span itemprop="copyrightYear">2017</span>
  <span class="with-love">
    <i class="fa fa-heart"></i>
  </span>
  <span class="author" itemprop="copyrightHolder">失落的乐章</span>
</div>


<div class="powered-by">
  由 <a class="theme-link" href="https://hexo.io">Hexo</a> 强力驱动
</div>

<div class="theme-info">
  主题 -
  <a class="theme-link" href="https://github.com/iissnan/hexo-theme-next">
    NexT.Muse
  </a>
</div>


        

        
      </div>
    </footer>

    
      <div class="back-to-top">
        <i class="fa fa-arrow-up"></i>
        
      </div>
    

  </div>

  

<script type="text/javascript">
  if (Object.prototype.toString.call(window.Promise) !== '[object Function]') {
    window.Promise = null;
  }
</script>









  












  
  <script type="text/javascript" src="/lib/jquery/index.js?v=2.1.3"></script>

  
  <script type="text/javascript" src="/lib/fastclick/lib/fastclick.min.js?v=1.0.6"></script>

  
  <script type="text/javascript" src="/lib/jquery_lazyload/jquery.lazyload.js?v=1.9.7"></script>

  
  <script type="text/javascript" src="/lib/velocity/velocity.min.js?v=1.2.1"></script>

  
  <script type="text/javascript" src="/lib/velocity/velocity.ui.min.js?v=1.2.1"></script>

  
  <script type="text/javascript" src="/lib/fancybox/source/jquery.fancybox.pack.js?v=2.1.5"></script>


  


  <script type="text/javascript" src="/js/src/utils.js?v=5.1.1"></script>

  <script type="text/javascript" src="/js/src/motion.js?v=5.1.1"></script>



  
  

  
  <script type="text/javascript" src="/js/src/scrollspy.js?v=5.1.1"></script>
<script type="text/javascript" src="/js/src/post-details.js?v=5.1.1"></script>



  


  <script type="text/javascript" src="/js/src/bootstrap.js?v=5.1.1"></script>



  


  




	





  





  





  






  





  

  

  

  

  

  

</body>
</html>
